<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            width: 400px;
            height: 400px;
            /* 背景颜色 */
            background-color: pink;
            /* 背景图 */
            background-image: url(../壁纸1.jpg);
            /* 默认背景图为平铺 */
            /* background-repeat: repeat; */
            /* 设置为不平铺 */
            background-repeat: no-repeat;
            /* 设置 横着平铺 */
            /* background-repeat: repeat-x; */
            /* 设置 竖着平铺 */
            /* background-repeat: repeat-y; */
        }
    </style>
</head>
<body>
    <div>文字</div>
    
</body>
</html>